import org.junit.Test;

import java.util.Arrays;


public class MainGenCode {
    String[] tableNames = {
//            "schedule_clock_punch"
//            "schedule_daily_schedule"
//            "schedule_month_schedule"
//            "schedule_config_sche_define"
//            "schedule_salary_detail"
//            "schedule_month_salary"
//            "schedule_salary_options"
//            "schedule_month_salary_rule"
//            "schedule_month_schedule_rule"
//            "sys_city"
//            "sys_social_security"
//            "schedule_tenantsocial_security"
//            "schedule_salary_detail"
//            "schedule_daily_schedule"
//            "schedule_tmp_post"
//            "schedule_time_period"
//            "schedule_dailyschedule_rule"
//            "schedule_tmp_userpost"
//            "business_async_task"
//            "schedule_ask_leave"
            "schedule_work_overtime"
    };
    @Test
    public void genCode() {
        String packageName = "com.ruoyi.project.business";
        // select table_name, table_comment, create_time, update_time from information_schema.tables
        //		where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
        //		and table_name = ''
        Arrays.stream(tableNames).forEach(tableName -> {
            EntityInfoUtil.generatorCodeToDisk(tableName, packageName);
        });
    }

}